package com.wonders.frame.entity;

import com.wonders.frame.core.entity.EntityTemplate;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author 顾乘瑞
 * @Description 任务基础信息
 * @Date 2020/8/18 2:00 PM
 */
@Table(name = "t_etl_task_basic_info")
@Data
public class ETLTask extends EntityTemplate {
    @Column(name = "task_name", columnDefinition = "varchar2(50) COMMENT '任务名称'")
    private String taskName;
    @Column(name = "task_name_cn", columnDefinition = "varchar2(50) COMMENT '任务名称-中文'")
    private String taskNameCn;
    //任务类型：事实表、维度表、统计表等
    @Column(name = "task_table_type", columnDefinition = "number(2) COMMENT '任务类型：事实表、维度表、统计表等'")
    private Integer taskTableType;
    //是否自动生成
    @Column(name = "task_automatic", columnDefinition = "number(2) COMMENT '是否自动生成'")
    private String taskAutomatic;
    //任务类型：0：sql语句 1：存储过程 2：hive sql等
    @Column(name = "task_type", columnDefinition = "number(2) COMMENT '任务类型：0：sql语句 1：存储过程 2：hive sql等'")
    private String taskType;
    @Column(name = "schedule_type", columnDefinition = "number(2) COMMENT '定时任务类型 0：按时间间隔 1：定时'")
    private Integer scheduleType;
    @Column(name = "execute_rate", columnDefinition = "number(4) COMMENT '执行频率'")
    private Integer executeRate;
    @Column(name = "schedule_cron", columnDefinition = "varchar2(50) COMMENT '执行时间'")
    private String scheduleCron;
    @Column(name = "time_unit", columnDefinition = "number(1) COMMENT '时间单位 0：毫秒 1：秒 2：分 3：时'")
    private Integer timeUnit;
    @Column(name = "execute_logic", columnDefinition = "varchar2(2000) COMMENT '执行逻辑'")
    private String executeLogic;
    @Column(name = "last_success_time", columnDefinition = "datetime COMMENT '上一次任务执行成功时间'")
    private Date lastSuccessTime;
    @Column(name = "next_execute_time", columnDefinition = "datetime COMMENT '下一次任务执行时间'")
    private Date nextExecuteTime;
    //任务状态 启用 未启用
    @Column(name = "task_status", columnDefinition = "number(2) COMMENT '任务状态 0：启用 1：未启用'")
    private Integer taskStatus;







}
